package collection2;

import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Deque;
import java.util.LinkedList;

/**
 * @Auther: 杨通通
 * @Date: 2024/10/26 23:16
 * @Description:
 */
public class queue2 {
    public static void main(String[] args) {
        Deque<String> d1 = new ArrayDeque<>();
        d1.addLast("c");
        d1.add("d");
        System.out.println(d1);

        LinkedList<String> d2 = new LinkedList<>(Arrays.asList("a","b"));
        d2.add("c");


        Deque<String> d3 = new ArrayDeque<>();
        d3.push("a");
        d3.push("b");
        d3.push("c");
        System.out.println(d3.pop());
        System.out.println(d3);
    }
}